<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.18" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Limit Order Book: limit_order_book.limit_order_book.LimitOrderBook Class Reference</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
    <script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
    <link href="html_stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div id="top">
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr style="height: 56px;">
                        <td id="projectalign" style="padding-left: 0.5em;">
                            <div id="projectname">Limit Order Book
                                &#160;<span id="projectnumber">2.0.0</span>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacelimit__order__book.html">limit_order_book</a></li><li class="navelem"><a class="el" href="namespacelimit__order__book_1_1limit__order__book.html">limit_order_book</a></li><li class="navelem"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html">LimitOrderBook</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">limit_order_book.limit_order_book.LimitOrderBook Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:afe518cd14592d3840e3308be2a3152ec"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#afe518cd14592d3840e3308be2a3152ec">__init__</a> (self)</td></tr>
<tr class="separator:afe518cd14592d3840e3308be2a3152ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af550f359c248a4edc4ad80ba30c2c8b5"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#af550f359c248a4edc4ad80ba30c2c8b5">__del__</a> (self)</td></tr>
<tr class="separator:af550f359c248a4edc4ad80ba30c2c8b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acca53feb99a2b0e52b7f4d4ddad5841f"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#acca53feb99a2b0e52b7f4d4ddad5841f">clear</a> (self)</td></tr>
<tr class="separator:acca53feb99a2b0e52b7f4d4ddad5841f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab87e35bbeb8631f8211c2c25fb796a8b"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#ab87e35bbeb8631f8211c2c25fb796a8b">limit_sell</a> (self, order_id, quantity, price)</td></tr>
<tr class="separator:ab87e35bbeb8631f8211c2c25fb796a8b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b8d5116ecf5889bea764de6600830d7"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#a1b8d5116ecf5889bea764de6600830d7">limit_buy</a> (self, order_id, quantity, price)</td></tr>
<tr class="separator:a1b8d5116ecf5889bea764de6600830d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af02d7c03476cd4e376a0160b7e73d7e8"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#af02d7c03476cd4e376a0160b7e73d7e8">limit</a> (self, side, order_id, quantity, price)</td></tr>
<tr class="separator:af02d7c03476cd4e376a0160b7e73d7e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c1c9b3080b2c7024d885732faaaf978"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#a6c1c9b3080b2c7024d885732faaaf978">has</a> (self, order_id)</td></tr>
<tr class="separator:a6c1c9b3080b2c7024d885732faaaf978"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa72c1e6b6235ec8d423d8b031febd94"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#afa72c1e6b6235ec8d423d8b031febd94">cancel</a> (self, order_id)</td></tr>
<tr class="separator:afa72c1e6b6235ec8d423d8b031febd94"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa6de4a81fbb7c5518315a73a5d33ea6"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#aaa6de4a81fbb7c5518315a73a5d33ea6">market_sell</a> (self, order_id, quantity)</td></tr>
<tr class="separator:aaa6de4a81fbb7c5518315a73a5d33ea6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92ac2c8cd23b68557a59efcc460f9b07"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#a92ac2c8cd23b68557a59efcc460f9b07">market_buy</a> (self, order_id, quantity)</td></tr>
<tr class="separator:a92ac2c8cd23b68557a59efcc460f9b07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afa44ddeafae49b3e6013aaf8446f0967"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#afa44ddeafae49b3e6013aaf8446f0967">market</a> (self, side, order_id, quantity)</td></tr>
<tr class="separator:afa44ddeafae49b3e6013aaf8446f0967"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac972e81fd137cb3dd08437c4a99ee1a7"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#ac972e81fd137cb3dd08437c4a99ee1a7">best_sell</a> (self)</td></tr>
<tr class="separator:ac972e81fd137cb3dd08437c4a99ee1a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d5ad9707267c1a44a5c099da871609c"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#a9d5ad9707267c1a44a5c099da871609c">best_buy</a> (self)</td></tr>
<tr class="separator:a9d5ad9707267c1a44a5c099da871609c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad9175f5a8fa5282e9948ab3f330fb915"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#ad9175f5a8fa5282e9948ab3f330fb915">best</a> (self, side)</td></tr>
<tr class="separator:ad9175f5a8fa5282e9948ab3f330fb915"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb82c4dc2cfc0826bd651d66c9fc47a4"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#afb82c4dc2cfc0826bd651d66c9fc47a4">volume_sell</a> (self, price=None)</td></tr>
<tr class="separator:afb82c4dc2cfc0826bd651d66c9fc47a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad859c49dd2909e97b22f0004be057b0e"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#ad859c49dd2909e97b22f0004be057b0e">volume_buy</a> (self, price=None)</td></tr>
<tr class="separator:ad859c49dd2909e97b22f0004be057b0e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83d98fa3da1e2f0e536e4b6112b00912"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#a83d98fa3da1e2f0e536e4b6112b00912">volume</a> (self, price=None)</td></tr>
<tr class="separator:a83d98fa3da1e2f0e536e4b6112b00912"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dad26578106236fc33e49bcbc73700d"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#a2dad26578106236fc33e49bcbc73700d">count_at</a> (self, price)</td></tr>
<tr class="separator:a2dad26578106236fc33e49bcbc73700d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2ffb73530c2d234c34358223a07f5bf"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#af2ffb73530c2d234c34358223a07f5bf">count_sell</a> (self)</td></tr>
<tr class="separator:af2ffb73530c2d234c34358223a07f5bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa91e3640a90267d5b99c158a102c9216"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#aa91e3640a90267d5b99c158a102c9216">count_buy</a> (self)</td></tr>
<tr class="separator:aa91e3640a90267d5b99c158a102c9216"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05cdeb18e40432a3f8f1034e2fe91df0"><td class="memItemLeft" align="right" valign="top">def&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlimit__order__book_1_1limit__order__book_1_1_limit_order_book.html#a05cdeb18e40432a3f8f1034e2fe91df0">count</a> (self)</td></tr>
<tr class="separator:a05cdeb18e40432a3f8f1034e2fe91df0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><pre class="fragment">The Limit Order Book (LOB).</pre> </div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="afe518cd14592d3840e3308be2a3152ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe518cd14592d3840e3308be2a3152ec">&#9670;&nbsp;</a></span>__init__()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.__init__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Initialize a new limit order book.</pre> 
</div>
</div>
<a id="af550f359c248a4edc4ad80ba30c2c8b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af550f359c248a4edc4ad80ba30c2c8b5">&#9670;&nbsp;</a></span>__del__()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.__del__ </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Delete this limit order book.</pre> 
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ad9175f5a8fa5282e9948ab3f330fb915"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad9175f5a8fa5282e9948ab3f330fb915">&#9670;&nbsp;</a></span>best()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.best </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>side</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the best price for the given side.

Args:
    side: the side of the book to get the best price for (False=sell)

Returns:
    the best price for the given side of the book</pre> 
</div>
</div>
<a id="a9d5ad9707267c1a44a5c099da871609c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d5ad9707267c1a44a5c099da871609c">&#9670;&nbsp;</a></span>best_buy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.best_buy </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the best buy price in the book.</pre> 
</div>
</div>
<a id="ac972e81fd137cb3dd08437c4a99ee1a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac972e81fd137cb3dd08437c4a99ee1a7">&#9670;&nbsp;</a></span>best_sell()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.best_sell </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the best sell price in the book.</pre> 
</div>
</div>
<a id="afa72c1e6b6235ec8d423d8b031febd94"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa72c1e6b6235ec8d423d8b031febd94">&#9670;&nbsp;</a></span>cancel()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.cancel </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>order_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Cancel an order with given order ID.

Args:
    order_id: the ID of the order to cancel

Returns:
    None</pre> 
</div>
</div>
<a id="acca53feb99a2b0e52b7f4d4ddad5841f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acca53feb99a2b0e52b7f4d4ddad5841f">&#9670;&nbsp;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.clear </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Clear all the orders in the book.</pre> 
</div>
</div>
<a id="a05cdeb18e40432a3f8f1034e2fe91df0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05cdeb18e40432a3f8f1034e2fe91df0">&#9670;&nbsp;</a></span>count()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.count </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the total count of the book (number of orders).</pre> 
</div>
</div>
<a id="a2dad26578106236fc33e49bcbc73700d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2dad26578106236fc33e49bcbc73700d">&#9670;&nbsp;</a></span>count_at()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.count_at </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>price</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the count at the given limit price.

Args:
    price: the price to get the count of the book for

Returns:
    the count of the book at the given price</pre> 
</div>
</div>
<a id="aa91e3640a90267d5b99c158a102c9216"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa91e3640a90267d5b99c158a102c9216">&#9670;&nbsp;</a></span>count_buy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.count_buy </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the count of the book on the buy side.</pre> 
</div>
</div>
<a id="af2ffb73530c2d234c34358223a07f5bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2ffb73530c2d234c34358223a07f5bf">&#9670;&nbsp;</a></span>count_sell()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.count_sell </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the count of the book on the sell side.</pre> 
</div>
</div>
<a id="a6c1c9b3080b2c7024d885732faaaf978"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c1c9b3080b2c7024d885732faaaf978">&#9670;&nbsp;</a></span>has()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.has </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>order_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return true if the order with given ID is in the book, false otherwise.

Args:
    order_id: the ID of the order to check for existence of

Returns:
    True if the order is in the book, False otherwise</pre> 
</div>
</div>
<a id="af02d7c03476cd4e376a0160b7e73d7e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af02d7c03476cd4e376a0160b7e73d7e8">&#9670;&nbsp;</a></span>limit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.limit </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>side</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>order_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>quantity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>price</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Place a sell limit order with given quantity and price.

Args:
    side: the side of the order to place
    order_id: the ID for the order to add
    quantity: the quantity of shares in the limit order to place
    price: the price of the limit order to place

Returns:
    None</pre> 
</div>
</div>
<a id="a1b8d5116ecf5889bea764de6600830d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b8d5116ecf5889bea764de6600830d7">&#9670;&nbsp;</a></span>limit_buy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.limit_buy </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>order_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>quantity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>price</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Place a sell limit order with given quantity and price.

Args:
    order_id: the ID for the order to add
    quantity: the quantity of shares in the limit order to place
    price: the price of the limit order to place

Returns:
    None</pre> 
</div>
</div>
<a id="ab87e35bbeb8631f8211c2c25fb796a8b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab87e35bbeb8631f8211c2c25fb796a8b">&#9670;&nbsp;</a></span>limit_sell()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.limit_sell </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>order_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>quantity</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>price</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Place a sell limit order with given quantity and price.

Args:
    order_id: the ID for the order to add
    quantity: the quantity of shares in the limit order to place
    price: the price of the limit order to place

Returns:
    None</pre> 
</div>
</div>
<a id="afa44ddeafae49b3e6013aaf8446f0967"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afa44ddeafae49b3e6013aaf8446f0967">&#9670;&nbsp;</a></span>market()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.market </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>side</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>order_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>quantity</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Place a market order.

Args:
    side: the side of the order to place
    order_id: the ID for the order to add
    quantity: the quantity of shares in the market order to place

Returns:
    None</pre> 
</div>
</div>
<a id="a92ac2c8cd23b68557a59efcc460f9b07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92ac2c8cd23b68557a59efcc460f9b07">&#9670;&nbsp;</a></span>market_buy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.market_buy </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>order_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>quantity</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Place a market buy order.

Args:
    order_id: the ID for the order to add
    quantity: the quantity of shares in the market order to place

Returns:
    None</pre> 
</div>
</div>
<a id="aaa6de4a81fbb7c5518315a73a5d33ea6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa6de4a81fbb7c5518315a73a5d33ea6">&#9670;&nbsp;</a></span>market_sell()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.market_sell </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>order_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>quantity</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Place a market sell order.

Args:
    order_id: the ID for the order to add
    quantity: the quantity of shares in the market order to place

Returns:
    None</pre> 
</div>
</div>
<a id="a83d98fa3da1e2f0e536e4b6112b00912"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83d98fa3da1e2f0e536e4b6112b00912">&#9670;&nbsp;</a></span>volume()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.volume </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>price</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the volume of the book at the given price.

Args:
    price: the price to get the volume at

Returns:
    the volume of orders at the given price

Note:
    returns the total volume if price is `None`</pre> 
</div>
</div>
<a id="ad859c49dd2909e97b22f0004be057b0e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad859c49dd2909e97b22f0004be057b0e">&#9670;&nbsp;</a></span>volume_buy()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.volume_buy </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>price</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the volume of the buy side of the book at the given price.

Args:
    price: the price to get the volume at

Returns:
    the volume of orders at the given price

Note:
    returns the total buy-side volume if price is `None`</pre> 
</div>
</div>
<a id="afb82c4dc2cfc0826bd651d66c9fc47a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afb82c4dc2cfc0826bd651d66c9fc47a4">&#9670;&nbsp;</a></span>volume_sell()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">def limit_order_book.limit_order_book.LimitOrderBook.volume_sell </td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>price</em> = <code>None</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Return the volume of the sell side of the book at the given price.

Args:
    price: the price to get the volume at

Returns:
    the volume of orders at the given price

Note:
    returns the total sell-side volume if price is `None`</pre> 
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>limit_order_book/limit_order_book.py</li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
